package com.wzq.animal.common.exception;

/**
 * 响应状态码
 * 000- 所有模块
 * 001- 登录模块
 * 002- 注册模块
 * 003- 文件上传下载文件相关
 */
public enum StatusCode {
    SUCCESS("000-200","请求成功！"),
    ERROR("000-500","系统未知异常！"),
    TOKEN_EMPTY("000-401","未获取到token, 请重新登录"),
    TOKEN_ILLEGAL("000-402","token不合法或已过期"),

    LOGIN_EMPTY("001-500","用户名或密码为空！"),
    LOGIN_USERNAME("001-501","用户名不存在！"),
    LOGIN_USERNAME_PASSWORD("001-502","用户名或者密码错误！"),
    LOGIN_CODE("001-503","验证码错误！"),

    REGISTER_USERNAME("002-501","用户已存在"),//修改用户名也用到此此对象

    FILE_EXISTS("003-501","文件已存在！"),
    FILE_UPDATE("003-502","修改失败！"),

    RESET_OLDPASS("004-501","原密码错误");
    private String code;
    private String msg;

    StatusCode(String code,String msg){
        this.code = code;
        this.msg = msg;
    }

    public String getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }

}
